// API响应类型定义
export interface ApiResponse<T = any> {
  success: boolean
  data?: T
  message?: string
  error?: string
}

// 用户相关类型
export interface User {
  id: number
  username: string
  email: string
  avatar_url?: string
  created_at: string
}

export interface LoginRequest {
  email: string
  password: string
}

export interface RegisterRequest {
  username: string
  email: string
  password: string
}

export interface AuthResponse {
  user: User
  accessToken: string
}

// 算法题相关类型
export interface AlgorithmProblem {
  id: number
  userId: string
  title: string
  description: string
  difficulty: 'easy' | 'medium' | 'hard'
  imageUrl?: string
  createdAt: Date
  updatedAt: Date
}

export interface AlgorithmSolution {
  id: string
  problemId: number
  code: string
  language?: string
  notes?: string
  savedAt: Date
}

export interface CreateAlgorithmRequest {
  title: string
  description: string
  difficulty: 'easy' | 'medium' | 'hard'
}

// 待办事项相关类型已移至 src/types/todo.ts

// 日历事件和用户活动相关类型已移至 src/types/calendar.ts